//
//  HeaderCollectionReusableView.m
//  BeautifulWardrobe
//
//  Created by mac on 16/7/29.
//  Copyright © 2016年 Yh. All rights reserved.
//

#import "HeaderCollectionReusableView.h"

#import "HeaderView.h"

@implementation HeaderCollectionReusableView
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if (self)
    {
      
    }
    
    return self;
}
- (void)showView
{
//    AFHTTPSessionManager * manager = [Session getSessionManage];
//    [manager GET:@"http://api.yuike.com/gmall/api/1.0/home/banner_list.php?mid=457465&sid=20d9a0a0c5caf318bcc7015cabe69151&yk_appid=1&yk_cbv=2.9.5&yk_pid=1&yk_user_id=5198489" parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
//        _scrollview = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)];
//        NSMutableArray * urlArray = [[NSMutableArray alloc]init];
//        NSDictionary * objectDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];
//        NSDictionary * dataDic = objectDic[@"data"];
//        NSArray * array = dataDic[@"items"];
//        for (NSDictionary * dict in array)
//        {
//            NSString * str = dict[@"pic_url"];
//            [urlArray addObject:str];
//        }
//        UIImageView * imageView =nil;
//        for (int i = 0; i < urlArray.count; i ++)
//        {
//            imageView = [[UIImageView alloc]initWithFrame:CGRectMake(i * [UIScreen mainScreen].bounds.size.width, 0, self.bounds.size.width, self.bounds.size.height)];
//            imageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:urlArray[i]]]];
//            [_scrollview addSubview:imageView];
//        }
//        _scrollview.contentSize = CGSizeMake(imageView.bounds.size.width * urlArray.count, 0);
//        
//        [self addSubview:_scrollview];
//
//        
//    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
//        
//    }];
}
@end
